{extend name="common/common" /}

{block name="style"}
<link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<style media="screen">
.tips{
	border:1px solid #E6A23C;
	color:#E6A23C;
	font-size: 16px;
	box-shadow: #E6A23C 0px 2px 12px 0px;
	font-family: "宋体";
	margin-bottom: 25px;
}
.table.table-bordered.table-striped tr td {
	line-height: 26px;
}
.ibox-title h5{
	float:none;
	font-weight: 999;
}
.span-danger{
	font-family: "宋体";
	font-weight: 999;
}
.el-radio-button--mini .el-radio-button__inner {
	padding: 7px 10px;
}
.table-public-service-system{
	min-width: 1550px;
}
.el-textarea__inner {
	line-height: 0.7;
}
label{
	margin-bottom: 0;
}
.el-dialog__body input[type="file"]{
	display: none;
}
</style>
{/block}

{block name="component"}
<div id="mapToolBox">
	<el-dialog title="描点（右键添加点，可以拖动的哦）" :visible.sync="showMap" fullscreen>
		<iframe id="aMap" src="{:url('Gis/map_addpoint_tool')}" width="100%" height="600" frameborder="0"></iframe>
		<div slot="footer" class="dialog-footer">
			<el-button @click="showMap = false">取消</el-button>
			<el-button type="success" @click="surePoint">确定</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
var map = new Vue({
	el:"#mapToolBox",
	data:{
		showMap:false,
		index:0
	},
	methods:{
		surePoint() {
			if(aMap.contentWindow.mapBox.isAdd){
				var i = this.index;
				var position = aMap.contentWindow.mapBox.getPosition();
				main.form.form1.poorVillages[i].lonlat= "a,"+position.lng+","+position.lat;
				this.showMap = false;
			}else{
				this.showMap = false;
			}
		},
	}
})
</script>
<div id="mapToolBox2">
	<el-dialog title="描点（右键添加点，可以拖动的哦）" :visible.sync="showMap" fullscreen>
		<iframe id="bMap" src="{:url('Gis/map_addpoint_tool')}" width="100%" height="600" frameborder="0"></iframe>
		<div slot="footer" class="dialog-footer">
			<el-button @click="showMap = false">取消</el-button>
			<el-button type="success" @click="surePoint">确定</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
var bmap = new Vue({
	el:"#mapToolBox2",
	data:{
		showMap:false,
		index:0
	},
	methods:{
		surePoint() {
			if(bMap.contentWindow.mapBox.isAdd){
				var i = this.index;
				var position = bMap.contentWindow.mapBox.getPosition();
				main.form.form2.servicePlatforms[i].lonlat= "b,"+position.lng+","+position.lat;
				this.showMap = false;
			}else{
				this.showMap = false;
			}
		},
	}
})
</script>
<div id="mapToolBox3">
	<el-dialog title="描点（右键添加点，可以拖动的哦）" :visible.sync="showMap" fullscreen>
		<iframe id="cMap" src="{:url('Gis/map_addpoint_tool')}" width="100%" height="600" frameborder="0"></iframe>
		<div slot="footer" class="dialog-footer">
			<el-button @click="showMap = false">取消</el-button>
			<el-button type="success" @click="surePoint">确定</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
var cmap = new Vue({
	el:"#mapToolBox3",
	data:{
		showMap:false,
		index:0
	},
	methods:{
		surePoint() {
			if(cMap.contentWindow.mapBox.isAdd){
				var i = this.index;
				var position = cMap.contentWindow.mapBox.getPosition();
				main.form.form3.transportSystems[i].lonlat= "c,"+position.lng+","+position.lat;
				this.showMap = false;
			}else{
				this.showMap = false;
			}
		},
	}
})
</script>
<div id="mapToolBox4">
	<el-dialog title="描点（右键添加点，可以拖动的哦）" :visible.sync="showMap" fullscreen>
		<iframe id="dMap" src="{:url('Gis/map_addpoint_tool')}" width="100%" height="600" frameborder="0"></iframe>
		<div slot="footer" class="dialog-footer">
			<el-button @click="showMap = false">取消</el-button>
			<el-button type="success" @click="surePoint">确定</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
var dmap = new Vue({
	el:"#mapToolBox4",
	data:{
		showMap:false,
		index:0
	},
	methods:{
		surePoint() {
			if(dMap.contentWindow.mapBox.isAdd){
				var i = this.index;
				var position = dMap.contentWindow.mapBox.getPosition();
				main.form.form4.projectBuilds[i].lonlat= "d,"+position.lng+","+position.lat;
				this.showMap = false;
			}else{
				this.showMap = false;
			}
		},
	}
})
</script>
<div id="mapToolBox5">
	<el-dialog title="描点（右键添加点，可以拖动的哦）" :visible.sync="showMap" fullscreen>
		<iframe id="eMap" src="{:url('Gis/map_addpoint_tool')}" width="100%" height="600" frameborder="0"></iframe>
		<div slot="footer" class="dialog-footer">
			<el-button @click="showMap = false">取消</el-button>
			<el-button type="success" @click="surePoint">确定</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
var emap = new Vue({
	el:"#mapToolBox5",
	data:{
		showMap:false,
		index:0
	},
	methods:{
		surePoint() {
			if(eMap.contentWindow.mapBox.isAdd){
				var i = this.index;
				var position = eMap.contentWindow.mapBox.getPosition();
				main.form.form5.trainProjects[i].lonlat= "e,"+position.lng+","+position.lat;
				this.showMap = false;
			}else{
				this.showMap = false;
			}
		},
	}
})
</script>
{/block}

{block name="content"}
<div class="ibox-title">
    <h5>
		<span class="span-primary">{{form.rptDate}} {{form.departName}}</span>
		电子商务进农村综合示范进展情况表
	</h5>
</div>
<div class="ibox-content">
	<el-form :model="form" :rules="rules" ref="form" label-width="100px" inline>
		<el-form-item label="填表人" prop="linkMan">
			<el-input v-model="form.linkMan"></el-input>
		</el-form-item>
		<el-form-item label="电话" prop="linkType">
			<el-input v-model="form.linkType"></el-input>
		</el-form-item>
		<el-card shadow="hover" class="tips">
		提示：1."*"为必填项，"*"填完后才能保存表格  2.系统"保存"是对整个表格的保存  3.请20分钟之内点击一次保存按钮  4.上传单个附件大小不能超过10M
		</el-card>
		<el-tabs type="border-card" style="margin-bottom:25px;">
			<el-tab-pane label="1.电商扶贫" style="overflow-x:auto">
				<table class="table table-bordered table-striped">
					<tbody>
						<tr>
							<td>全县当月服务建档立卡贫困人口（人次）</td>
							<td>
								<el-input type="number" min="0"
								size="mini" v-model="form.form1.poorSum"></el-input>
							</td>
							<td>全县当月帮助建档立卡贫困人口增收总金额（元）</td>
							<td>
								<el-input type="number" step="0.01" min="0"
								size="mini" v-model="form.form1.helpAddProfit"></el-input>
							</td>
						</tr>
						<tr>
							<td>全县当月服务建档立卡贫困人口人数（人）</td>
							<td>
								<el-input type="number" min="0"
								size="mini" v-model="form.form1.poorPeopleSum"
								></el-input>
							</td>
							<td>全县当月帮助建档立卡贫困人口人均增收金额（元）（自动计算）</td>
							<td>
								<el-input size="mini" readonly v-model="form.form1.poorAvgProfit"></el-input>
							</td>
						</tr>
						<tr>
							<td>全县截至当月服务建档立卡贫困人口总人数（人）</td>
							<td>
								<el-input size="mini" type="number" min="0"
								v-model="form.form1.poorSumPeopleSum"></el-input>
							</td>
							<td>当月对建档立卡贫困人口培训（人次）</td>
							<td>
								<el-input size="mini" type="number" min="0" v-model="form.form1.jobPeopleCount"></el-input>
							</td>
						</tr>
						<tr>
							<td>全县当月帮助建档立卡贫困人口销售总金额（元）</td>
							<td>
								<el-input size="mini" type="number" step="0.01" min="0"
								v-model="form.form1.helpPoorSale"></el-input>
							</td>
							<td>全县当月带动建档立卡贫困人口就业人数（人）</td>
							<td>
								<el-input size="mini" type="number" min="0"
								v-model="form.form1.jobPoorCount"></el-input>
							</td>
						</tr>
					</tbody>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						提示：
					</div>
					<div class="text item">
						1.从2017年8月份月报开始，调整电商扶贫统计有关指标，增加统计指标“服务建档立卡贫困人口人数（人）、帮助建档立卡贫困人口增收总金额（元）”，“当月（截至当月）帮助建档立卡贫困人口人均增收金额（元）”指标变为自动计算,计算方式为：帮助建档立卡贫困人口增收总金额/服务建档立卡贫困人口人数。
					</div>
					<div class="text item">
						2.“服务建档立卡贫困人口（人次）”表示若干次人数的总和，包括重复服务的人员，“服务建档立卡贫困人口人数（人）”表示人员数量，不累计重复服务的人员。
					</div>
					<div class="text item">
						3.“服务建档立卡贫困人口”指接收代买、代卖、培训和就业等电商服务的建档立卡贫困人口，包括没有产生增收服务的建档立卡贫困人口。
					</div>
					<div class="text item">
						4.“当月对建档立卡贫困人口培训（人次）”与表5“农村电商培训”中该项相关联，在本表中填写即可。
					</div>
					<div class="text item">
						5.如果没有产生相关数据请填写“0”，不填写会影响数据汇总。
					</div>
				</el-card>
				<table class="table table-bordered table-striped text-center">
					<tbody>
						<tr>
							<td>建档立卡贫困村个数（个）</td>
							<td>
								<el-input size="mini" type="number" min="0" v-model="form.form1.poorVillageCount"></el-input>
							</td>
							<td>服务站点已覆盖建档立卡贫困村个数（个）</td>
							<td>
								<el-input size="mini" type="number" min="0" v-model="form.form1.poorVillageFill"></el-input>
							</td>
							<td>截至当月服务站点已覆盖非建档立卡贫困村的建档立卡贫困人口人数（人）</td>
							<td>
								<el-tooltip class="item" effect="dark"
									content="无贫困村只有贫困人口情况填写"
									placement="bottom">
									<el-input size="mini" type="number" min="0"
										v-model="form.form1.poorNoVlgPeople">
									</el-input>
								</el-tooltip>
							</td>
						</tr>
						<tr>
							<th class="text-center">序号</th>
							<th class="text-center">服务站点已覆盖建档立卡贫困村名称</th>
							<th class="text-center">地址</th>
							<th class="text-center">描点</th>
							<th class="text-center">截至当月本村建档立卡贫困人口人数（人）</th>
							<th class="text-center">操作</th>
						</tr>
						<tr v-for="(poorVitem, index) in form.form1.poorVillages">
							<td>{{index + 1}}</td>
							<td>
								<el-input size="mini"
									v-model="poorVitem.name">
								</el-input>
							</td>
							<td>
								<el-input size="mini"
									v-model="poorVitem.address">
								</el-input>
							</td>
							<td>
								<el-input size="mini" readonly
									@focus="addMapoint1(index)"
									placeholder="右键添加点，可以拖动的哦"
									v-model="poorVitem.lonlat">
								</el-input>
							</td>
							<td>
								<el-input size="mini"
									v-model="poorVitem.poorCount" type="number">
								</el-input>
							</td>
							<td>
								<el-button type="danger" icon="el-icon-delete"
									size="mini" circle plain
									@click="delRow1(poorVitem)">
								</el-button>
							</td>
						</tr>
						<tr>
							<td colspan="6">
								<el-button type="info" size="mini" @click="addRow1">
									添加
								</el-button>
							</td>
						</tr>
					</tbody>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						提示：保存报表后，才可以批量导入贫困村信息。
					</div>
				</el-card>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.含有建档立卡贫困村和建档立卡贫困人口的示范县均填写此表。
					</div>
					<div class="text item">
						2.表格里所填建设项目均为中央财政资金支持和建设的内容。
					</div>
					<div class="text item">
						3.“服务站点已覆盖建档立卡贫困村”信息在本月月报填写后，下月月报将自动保留（按顺序填写月报情况下），后续新增内容在后面继续添加或者修改，以最后一个月月报填报为准。
					</div>
					<div class="text item">
						4.描点为“建档立卡贫困村所在地理位置标注"，点击描点下方框显示地图，搜索相应地点自动定位后退出即可。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="2.公共服务体系" style="overflow-x:auto">
				<table class="table table-bordered table-striped text-center table-public-service-system">
					<tr>
						<td colspan="10" class="text-right">
							<span class="span-danger">*</span>当月“全县”网购金额（万元）</td>
						<td colspan="3">
							<el-input type="number" min="0"
							size="mini" v-model="form.form1.poorSum"></el-input>
						</td>
					</tr>
					<tr>
						<th class="text-center" width="50px">序号</th>
						<th class="text-center">项目建设类型</th>
						<th class="text-center">名称</th>
						<th class="text-center">详细地址</th>
						<th class="text-center">描点</th>
						<th class="text-center">主要功能</th>
						<th class="text-center" width="100px">负责人</th>
						<th class="text-center">联系电话</th>
						<th class="text-center">选择系统注册企业</th>
						<th class="text-center">服务站ID</th>
						<th class="text-center">设施配置</th>
						<th class="text-center" width="110px">承担物流配送</th>
						<th class="text-center">操作</th>
					</tr>
					<tr v-for="(servicePitem, index) in form.form2.servicePlatforms">
						<td>{{index + 1}}</td>
						<td>
							<el-select v-model="servicePitem.buildType" size="mini"
							placeholder="请选择">
								<el-option label="县级服务中心" value="1"></el-option>
								<el-option label="乡镇级服务站" value="2"></el-option>
								<el-option label="村级服务站" value="3"></el-option>
							</el-select>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.name"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.address"></el-input>
						</td>
						<td>
							<el-input size="mini" readonly @focus="addMapoint2(index)"
							placeholder="右键添加点，可以拖动的哦"
							v-model="servicePitem.lonlat"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.mainFunction"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.managePeople"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.linkTel"></el-input>
						</td>
						<td>
							<el-select v-model="servicePitem.userIds" size="mini"
							placeholder="请选择">
								<el-option label="A公司" value="1"></el-option>
								<el-option label="B公司" value="2"></el-option>
								<el-option label="C公司" value="3"></el-option>
							</el-select>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.code"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="servicePitem.equipment"></el-input>
						</td>
						<td>
							<el-radio-group v-model="servicePitem.isShare" size="mini">
								<el-radio-button :label="true">是</el-radio-button>
								<el-radio-button :label="false">否</el-radio-button>
				    		</el-radio-group>
						</td>
						<td>
							<el-button type="danger" icon="el-icon-delete"
								size="mini" circle plain
								@click="delRow2(index,servicePitem)">
							</el-button>
						</td>
					</tr>
					<tr>
						<td colspan="13">
							<el-button type="info" size="mini" @click="addRow2">
								添加
							</el-button>
						</td>
					</tr>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						提示：保存表后，才可以批量导入服务站点信息。
					</div>
				</el-card>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.县级服务中心、服务站等公共服务体系建设项目填一次即可，不用每月重复填写，否则汇总数据错误。并注意项目建设类型要点击三角标识下拉框中进行选择，否则无法提交。
					</div>
					<div class="text item">
						2.全县网购金额是指包括全县范围的网购金额，不仅限于服务站点代购金额。
					</div>
					<div class="text item">
						3.“是否承担物流配送功能”是指县级服务中心是否与县级物流配送中心共享场地；乡镇服务站点是否承担乡镇级（村级）物流服务点功能。
					</div>
					<div class="text item">
						4.所填写服务站必须填写“选择系统注册企业、服务站ID”，否则无法报送日报。注册企业为站点承办企业，在系统用户管理中“企业用户”中注册，注册后可选择系统注册企业，颜色变深才是选中状态，按住ctrl键可实现多选。服务站ID可编写，数字、字母或者两者组合，不能重复。
					</div>
					<div class="text item">
						5.“村级服务站点导入”功能在报表保存后操作。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="3.物流配送体系" style="overflow-x:auto">
				<table class="table table-bordered table-striped text-center">
					<tr>
						<td>是否对县城到村物流资源进行整合</td>
						<td>
							<el-radio-group v-model="form.form3.isCombine" size="mini">
							<el-radio-button :label="true">是</el-radio-button>
							<el-radio-button :label="false">否</el-radio-button>
							</el-radio-group>
						</td>
						<td>说明</td>
						<td>
							<el-input type="textarea"
							size="mini" placeholder="是，怎么整合；否，说明原因"
							v-model="form.form3.combineReason"></el-input>
						</td>
					</tr>
					<tr>
						<td>其他需要说明的农村电商物流解决方案</td>
						<td colspan="3">
							<el-input type="textarea" size="mini"
							v-model="form.form3.otherPlan"></el-input>
						</td>
					</tr>
					<tr>
						<td>乡镇快递（网点）覆盖率（%）</td>
						<td>
							<el-input size="mini" type="number" min="0" max="100" v-model="form.form3.xiangzhenFillRatio"></el-input>
						</td>
						<td>县→乡快递服务企业数量(个）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form3.xianxiangCount"></el-input>
						</td>
					</tr>
					<tr>
						<td>企业名称</td>
						<td>
							<el-input size="mini" placeholder="与前面数量对应"
							v-model="form.form3.xianxiangCompany"></el-input>
						</td>
						<td>配送频率</td>
						<td>
							<el-select v-model="form.form3.xianxiangFreq" size="mini"
							placeholder="请选择">
								<el-option label="一日1次" value="1"></el-option>
								<el-option label="一日2次" value="2"></el-option>
								<el-option label="两日1次" value="3"></el-option>
								<el-option label="三日1次" value="4"></el-option>
								<el-option label="四日1次" value="5"></el-option>
								<el-option label="五日1次" value="6"></el-option>
								<el-option label="一周1次" value="7"></el-option>
								<el-option label="其他" value="8"></el-option>
							</el-select>
						</td>
					</tr>
					<tr>
						<td>行政村快递（网点）覆盖率（%）</td>
						<td>
							<el-input size="mini" type="number" min="0" max="100"
							placeholder="不含邮政普通包裹"
							 v-model="form.form3.cunFillRatio"></el-input>
						</td>
						<td>乡→村快递服务企业数量(个）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form3.xiangcunCount"></el-input>
						</td>
					</tr>
					<tr>
						<td>企业名称</td>
						<td>
							<el-input size="mini" placeholder="与前面数量对应"
							v-model="form.form3.xiangcunCompany"></el-input>
						</td>
						<td>配送频率</td>
						<td>
							<el-select v-model="form.form3.xiangcunFreq" size="mini"
							placeholder="请选择">
								<el-option label="一日1次" value="1"></el-option>
								<el-option label="一日2次" value="2"></el-option>
								<el-option label="两日1次" value="3"></el-option>
								<el-option label="三日1次" value="4"></el-option>
								<el-option label="四日1次" value="5"></el-option>
								<el-option label="五日1次" value="6"></el-option>
								<el-option label="一周1次" value="7"></el-option>
								<el-option label="其他" value="8"></el-option>
							</el-select>
						</td>
					</tr>
					<tr>
						<td>农民网购是否需要对县城到农村的物流额外支付快递费用</td>
						<td>
							<el-radio-group v-model="form.form3.isPay" size="mini">
							<el-radio-button :label="true">是</el-radio-button>
							<el-radio-button :label="false">否</el-radio-button>
							</el-radio-group>
						</td>
						<td>收费标准（元）</td>
						<td>
							<el-input type="textarea"
							size="mini" placeholder="是，说明收费标准情况"
							v-model="form.form3.payInfo"></el-input>
						</td>
					</tr>
					<tr>
						<td><span class="span-danger">*</span>当月本县快递收件数量（件）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							placeholder="不含邮政普通包裹"
							 v-model="form.form3.receiveNum"></el-input>
						</td>
						<td><span class="span-danger">*</span>当月本县快递发件数量（件）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form3.sendNum"></el-input>
						</td>
					</tr>
				</table>
				<table class="table table-bordered table-striped text-center">
					<tr>
						<th class="text-center" width="50px">序号</th>
						<th class="text-center">项目建设类型</th>
						<th class="text-center">名称</th>
						<th class="text-center">详细地址</th>
						<th class="text-center">描点</th>
						<th class="text-center" width="100px">负责人</th>
						<th class="text-center">联系电话</th>
						<th class="text-center">操作</th>
					</tr>
					<tr v-for="(transportSitem, index) in form.form3.transportSystems">
						<td>{{index + 1}}</td>
						<td>
							<el-select v-model="transportSitem.buildType" size="mini"
							placeholder="请选择">
								<el-option label="县级服务中心" value="1"></el-option>
								<el-option label="乡镇级服务站" value="2"></el-option>
								<el-option label="村级服务站" value="3"></el-option>
							</el-select>
						</td>
						<td>
							<el-input size="mini" v-model="transportSitem.name"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="transportSitem.address"></el-input>
						</td>
						<td>
							<el-input size="mini" readonly @focus="addMapoint3(index)"
							placeholder="右键添加点，可以拖动的哦"
							v-model="transportSitem.lonlat"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="transportSitem.managePeople"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="transportSitem.linkTel"></el-input>
						</td>
						<td>
							<el-button type="danger" icon="el-icon-delete"
								size="mini" circle plain
								@click="delRow3(index,transportSitem)">
							</el-button>
						</td>
					</tr>
					<tr>
						<td colspan="13">
							<el-button type="info" size="mini" @click="addRow3">
								添加
							</el-button>
						</td>
					</tr>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						提示：保存报表后，才可以批量导入物流配送信息。
					</div>
				</el-card>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.配送中心、乡镇快递网点等物流配送体系建设项目填一次即可，不用每月重复填写，否则汇总数据错误。并注意项目建设类型要点击三角标识下拉框中进行选择，否则无法提交。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="4.农村产品上行" style="overflow-x:auto">
				<table class="table table-bordered table-striped text-center">
					<tr>
						<td colspan="2">
							<span class="span-danger">*</span>
							全县当月网络零售额（万元）
						</td>
						<td>
							<el-input size="mini" v-model="form.form4.netSale" type="number"></el-input>
						</td>
						<td>
							<span class="span-danger">*</span>
							全县当月新增农产品网销单品（SKU）（个）
						</td>
						<td>
							<el-input size="mini" v-model="form.form4.newSaleCount" type="number"></el-input>
						</td>
						<td colspan="2">
							<span class="span-danger">*</span>
							全县当月主要网销品种
						</td>
						<td>
							<el-tooltip class="item" effect="dark"
							content="例如：茶叶、脐橙、苹果等" placement="bottom">
							<el-input size="mini" v-model="form.form4.saleCommodity"></el-input>
							</el-tooltip>
						</td>
					</tr>
					<tr>
						<th class="text-center" width="50px">序号</th>
						<th class="text-center">项目建设名称</th>
						<th class="text-center" width="150px">项目建设内容</th>
						<th class="text-center">项目承办单位</th>
						<th class="text-center">描点</th>
						<th class="text-center">承办单位负责人</th>
						<th class="text-center">联系电话</th>
						<th class="text-center" width="150px">操作</th>
					</tr>
					<tr v-for="(projectBitem, index) in form.form4.projectBuilds">
						<td>{{index + 1}}</td>
						<td>
							<el-input size="mini" v-model="projectBitem.name"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="projectBitem.buildContent"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="projectBitem.projectEnter"></el-input>
						</td>
						<td>
							<el-input size="mini" readonly @focus="addMapoint4(index)"
							placeholder="右键添加点，可以拖动的哦"
							v-model="projectBitem.lonlat"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="projectBitem.companyManager"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="projectBitem.manageTel"></el-input>
						</td>
						<td>
							<el-button type="danger" icon="el-icon-delete"
								size="mini" circle plain
								@click="delRow4(index,projectBitem)">
							</el-button>
						</td>
					</tr>
					<tr>
						<td colspan="13">
							<el-button type="info" size="mini" @click="addRow4">
								添加
							</el-button>
						</td>
					</tr>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.农村产品上行所填项目与表6“资金拨付情况表”相关联，农村产品上行表不填写项目名称，资金拨付表则不显示。
					</div>
					<div class="text item">
						2.该表本月所填项目，在下月月报会自动保留（按顺序填写月报情况下），没有问题切勿删除或者修改，否则资金拨付中该项目将一并删除，拨付资金将无法累计。如有新增农村产品上行项目在原项目后继续添加。
					</div>
					<div class="text item">
						3.描点为“农产品上行项目承办单位所在地理位置标注"，点击描点下方框显示地图，搜索相应地点自动定位后退出即可。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="5.农村电商培训" style="overflow-x:auto">
				<table class="table table-bordered table-striped table-public-service-system">
					<tr>
						<td class="text-right" colspan="2">当月培训人数总计（人次）（自动计算）</td>
						<td>
							<el-input size="mini" readonly placeholder="自动计算"
							v-model="form.form5.trainSum"></el-input>
						</td>
						<td class="text-right" colspan="2">政府工作人员</td>
						<td>
							<el-input size="mini" type="number"
							v-model="form.form5.govCount"></el-input>
						</td>
						<td class="text-right" colspan="2">农村青年、返乡农民工等人员</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.farmerCount"></el-input>
						</td>
					</tr>
					<tr>
						<td class="text-right" colspan="2">其中：建档立卡贫困人口（与表1关联）</td>
						<td>
							<el-input size="mini" readonly
							v-model="form.form5.poorCount"></el-input>
						</td>
						<td class="text-right" colspan="2">残疾人</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.disableCount"></el-input>
						</td>
						<td class="text-right" colspan="2">当月电商带动全县就业人数（人）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.driveJob"></el-input>
						</td>
					</tr>
					<tr>
						<td class="text-right" colspan="2">当月全县新增网商总数（个）（自动计算）</td>
						<td>
							<el-input size="mini" readonly placeholder="自动计算"
							v-model="form.form5.netComCount"></el-input>
						</td>
						<td class="text-right" colspan="2">其中，当月经培训新孵化网商数（自动计算）</td>
						<td>
							<el-input size="mini" readonly placeholder="自动计算"
							v-model="form.form5.netComNewCount"></el-input>
						</td>
						<td class="text-right" colspan="2">网商中：当月新增企业网商总数（个）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.companyCount"></el-input>
						</td>
					</tr>
					<tr>
						<td class="text-right" colspan="2">其中，当月经培训新孵化企业网商数</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.companyNewCount"></el-input>
						</td>
						<td class="text-right" colspan="2">网商中：当月新增个人网商总数（个）</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.peopleCount"></el-input>
						</td>
						<td class="text-right" colspan="2">其中，当月经培训新孵化个人网商数</td>
						<td>
							<el-input size="mini" type="number" min="0"
							v-model="form.form5.peopleNewCount"></el-input>
						</td>
					</tr>
					<tr>
						<th class="text-center" width="120px">序号</th>
						<th class="text-center">培训项目名称</th>
						<th class="text-center">培训内容</th>
						<th class="text-center">项目承办单位</th>
						<th class="text-center">描点</th>
						<th class="text-center">承办单位负责人</th>
						<th class="text-center">联系电话</th>
						<th class="text-center">培训人员签到表</th>
						<th class="text-center" width="100px">操作</th>
					</tr>
					<tr v-for="(trainPitem5, index) in form.form5.trainProjects" class="text-center">
						<td>{{index + 1}}</td>
						<td>
							<el-input size="mini" v-model="trainPitem5.name"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="trainPitem5.content"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="trainPitem5.projectEnter"></el-input>
						</td>
						<td>
							<el-input size="mini" readonly @focus="addMapoint5(index)"
							placeholder="右键添加点，可以拖动的哦"
							v-model="trainPitem5.lonlat"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="trainPitem5.companyManager"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="trainPitem5.manageTel"></el-input>
						</td>
						<td>
							<!-- <el-input size="mini" type="file"
							v-model="trainPitem5.signInFile"></el-input> -->
							<el-button size="mini" type="primary" plain
								@click="uploadAttach(5,index)"
								>选择文件 {{trainPitem5.signInFile}}
							</el-button>
						</td>
						<td>
							<el-button type="danger" icon="el-icon-delete"
								size="mini" circle plain
								@click="delRow5(index,trainPitem5)">
							</el-button>
						</td>
					</tr>
					<tr class="text-center">
						<td colspan="13">
							<el-button type="info" size="mini" @click="addRow5">
								添加
							</el-button>
						</td>
					</tr>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.农村电商培训所填项目与表6“资金拨付情况表”相关联，农村电商培训表不填写项目名称，资金拨付表中则不显示。
					</div>
					<div class="text item">
						2.该表本月所填项目，在下月月报会自动保留（按顺序填写月报情况下），没有问题切勿删除或者修改，否则资金拨付中该项目将一并删除，拨付资金将无法累计。如有新增农村电商培训项目在原项目后继续添加。
					</div>
					<div class="text item">
						3.描点为“农村电商培训项目承办单位所在地理位置标注"，点击描点下方框显示地图，搜索相应地点自动定位后退出即可。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="6.资金拨付情况" style="overflow-x:auto">
				<table class="table table-bordered table-striped text-center">
					<tr>
						<td class="text-center">
							<el-button size="mini" type="primary" plain
							icon="el-icon-refresh"
							@click="autoLink">同步</el-button>
						</td>
						<td class="text-right" colspan="8">
							<span class="span-danger">（单位：万元）</span>
						</td>
					</tr>
					<tr>
						<th class="text-center" width="110px">支持内容</th>
						<th class="text-center" width="110px">项目名称</th>
						<th class="text-center">中央财政资金拟支持金额</th>
						<th class="text-center">当月拨付金额</th>
						<th class="text-center">累计拨付金额(自动计算)</th>
						<th class="text-center">地方财政累计配套资金金额</th>
						<th class="text-center">企业累计配套资金金额</th>
						<th class="text-center">中央财政资金支持建设内容</th>
						<th class="text-center">项目承办单位</th>
					</tr>
					<tr v-for="(financesItem, index) in form.form6.finances">
						<td>{{financesItem.td1}}</td>
						<td>{{financesItem.td2}}</td>
						<td>
							<el-input size="mini" min="0" type="number" v-model="financesItem.centerMoney"></el-input>
						</td>
						<td>
							<el-input size="mini" min="0" type="number" v-model="financesItem.centerMonthPay"></el-input>
						</td>
						<td>
							<el-input size="mini" readonly v-model="financesItem.centerPay"></el-input>
						</td>
						<td>
							<el-input size="mini" min="0" type="number" v-model="financesItem.localMoney"></el-input>
						</td>
						<td>
							<el-input size="mini" min="0" type="number" v-model="financesItem.companyPay"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="financesItem.centerSupport"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="financesItem.projectCompany"></el-input>
						</td>
					</tr>
				</table>
				<el-card shadow="hover" class="tips">
					<div class="text item">
						注：
					</div>
					<div class="text item">
						1.资金拨付中“农村产品上行项目”和“农村电商培训项目”与表4、表5关联，需在表4、表5中填写相应项目，资金拨付表需要点击“同步”按钮后关联并显示项目名称。
					</div>
					<div class="text item">
						2.注意表4“农村产品上行”、表5“农村电商培训”中本月所填项目将自动保留至下一月（按顺序填写月报情况下），没有问题切勿删除或者修改，否则资金拨付项中该项目将丢失，拨付资金将无法累计。
					</div>
				</el-card>
			</el-tab-pane>
			<el-tab-pane label="7.决策和公开情况" style="overflow-x:auto">
				<table class="table table-bordered table-striped text-center">
					<tr>
						<th class="text-center">序号</th>
						<th class="text-center">项目名称</th>
						<th class="text-center">决策领导</th>
						<th class="text-center">决策文件</th>
						<th class="text-center">信息公开网址</th>
						<th class="text-center">操作</th>
					</tr>
					<tr v-for="(govDitem, index) in form.form7.govDecisions">
						<td>{{index + 1}}</td>
						<td>
							<el-input size="mini" v-model="govDitem.name"></el-input>
						</td>
						<td>
							<el-input size="mini" v-model="govDitem.officeHolder"></el-input>
						</td>
						<td>
							<!-- <el-input size="mini" type="file"
							v-model="govDitem.determineFile"></el-input> -->
							<el-button size="mini" type="primary" plain
								@click="uploadAttach(7,index)"
								>选择文件 {{govDitem.determineFile}}
							</el-button>
						</td>
						<td>
							<el-input size="mini" v-model="govDitem.publicUrl"></el-input>
						</td>
						<td>
							<el-button type="danger" icon="el-icon-delete"
								size="mini" circle plain
								@click="delRow7(index,govDitem)">
							</el-button>
						</td>
					</tr>
					<tr>
						<td colspan="6">
							<el-button type="info" size="mini" @click="addRow7">
								添加
							</el-button>
						</td>
					</tr>
				</table>
			</el-tab-pane>
		</el-tabs>
		<p class="text-center">
			<el-button type="danger" plain @click="reset">重置表格</el-button>
			{if authCheck('tablequery/monthedit')}
			<el-button type="primary" plain @click="save">保存表格</el-button>
			{/if}
			{if authCheck('tablequery/monthedit')}
			<el-button type="success" plain @click="subTable">提交表格</el-button>
			{/if}
		</p>
	</el-form>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
var main = new Vue({
	el:"#main",
	data:{
		loading:false,
		form:{
			rptDate:"",
			departName:"",
			departId:"",
			linkMan:'',
			linkType:'',
			form1:{
				poorSum:"",
				helpAddProfit:"",
				poorPeopleSum:"",
				poorAvgProfit:(0).toFixed(2),
				poorSumPeopleSum:"",
				jobPeopleCount:"",
				helpPoorSale:"",
				jobPoorCount:"",
				poorVillageCount:"",
				poorVillageFill:"",
				poorNoVlgPeople:"",
				poorVillages:[
					{name:'',address:'',lonlat:'',poorCount:''}
				]
			},
			form2:{
				servicePlatforms:[{
					buildType:'',name:'',address:'',lonlat:'',mainFunction:'',managePeople:'',
					linkTel:'',userIds:'',code:'',equipment:'',isShare:'false'
				}]
			},
			form3:{
				isCombine:"",
				combineReason:"",
				otherPlan:"",
				xiangzhenFillRatio:"",
				xianxiangCount:"",
				xianxiangCompany:"",
				xianxiangFreq:"",
				cunFillRatio:"",
				xiangcunCount:"",
				xiangcunCompany:"",
				xiangcunFreq:"",
				isPay:"",
				payInfo:"",
				receiveNum:"",
				sendNum:"",
				transportSystems:[{
					buildType:"",name:"",address:"",lonlat:"",managePeople:"",linkTel:""
				}]
			},
			form4:{
				netSale:"",newSaleCount:"",saleCommodity:"",
				projectBuilds:[{
					name:"",buildContent:"",projectEnter:"",lonlat:"",
					companyManager:"",manageTel:""
				}]
			},
			form5:{
				trainSum:"",govCount:"",farmerCount:"",poorCount:"",
				disableCount:"",driveJob:"",netComCount:"",netComNewCount:"",
				companyCount:"",companyNewCount:"",peopleCount:"",peopleNewCount:"",
				trainProjects:[{
					name:"",content:"",projectEnter:"",lonlat:"",companyManager:"",
					manageTel:"",signInFile:""
				}]
			},
			form6:{
				finances:[{
					td1:"公共服务体系",td2:"县级服务中心",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"公共服务体系",td2:"乡镇级服务站",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"公共服务体系",td2:"村级服务站",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"配送中心",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"乡镇快递网点",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"其他",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				}]
			},
			form7:{
				govDecisions:[{
					name:"",officeHolder:"",determineFile:"",publicUrl:""
				}]
			}
		},
		form_reset:{
			rptDate:"",
			departName:"",
			departId:"",
			linkMan:'',
			linkType:'',
			form1:{
				poorSum:"",
				helpAddProfit:"",
				poorPeopleSum:"",
				poorAvgProfit:(0).toFixed(2),
				poorSumPeopleSum:"",
				jobPeopleCount:"",
				helpPoorSale:"",
				jobPoorCount:"",
				poorVillageCount:"",
				poorVillageFill:"",
				poorNoVlgPeople:"",
				poorVillages:[
					{name:'',address:'',lonlat:'',poorCount:''}
				]
			},
			form2:{
				servicePlatforms:[{
					buildType:'',name:'',address:'',lonlat:'',mainFunction:'',managePeople:'',
					linkTel:'',userIds:'',code:'',equipment:'',isShare:'false'
				}]
			},
			form3:{
				isCombine:"",
				combineReason:"",
				otherPlan:"",
				xiangzhenFillRatio:"",
				xianxiangCount:"",
				xianxiangCompany:"",
				xianxiangFreq:"",
				cunFillRatio:"",
				xiangcunCount:"",
				xiangcunCompany:"",
				xiangcunFreq:"",
				isPay:"",
				payInfo:"",
				receiveNum:"",
				sendNum:"",
				transportSystems:[{
					buildType:"",name:"",address:"",lonlat:"",managePeople:"",linkTel:""
				}]
			},
			form4:{
				netSale:"",newSaleCount:"",saleCommodity:"",
				projectBuilds:[{
					name:"",buildContent:"",projectEnter:"",lonlat:"",
					companyManager:"",manageTel:""
				}]
			},
			form5:{
				trainSum:"",govCount:"",farmerCount:"",poorCount:"",
				disableCount:"",driveJob:"",netComCount:"",netComNewCount:"",
				companyCount:"",companyNewCount:"",peopleCount:"",peopleNewCount:"",
				trainProjects:[{
					name:"",content:"",projectEnter:"",lonlat:"",companyManager:"",
					manageTel:"",signInFile:""
				}]
			},
			form6:{
				finances:[{
					td1:"公共服务体系",td2:"县级服务中心",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"公共服务体系",td2:"乡镇级服务站",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"公共服务体系",td2:"村级服务站",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"配送中心",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"乡镇快递网点",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				},{
					td1:"物流配送体系",td2:"其他",
					centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
					companyPay:"",centerSupport:"",projectCompany:""
				}]
			},
			form7:{
				govDecisions:[{
					name:"",officeHolder:"",determineFile:"",publicUrl:""
				}]
			}
		},
		rules:{
			linkMan:[{required:true,message:'填表人不能为空',trigger:['blur','change']}],
			linkType:[{required:true,message:'填表人不能为空',trigger:['blur','change']}],
		}
	},
	watch:{
		form:{
			handler(newValue, oldValue) {
				this.autoCompute1();
				this.checkForm1();
				this.autoCompute5();
				this.checkForm5();
				this.autoCompute6();
				this.checkForm6();
			},deep: true
		}
	},
	mounted:function(){
		var id = "{$id}";
		$.post('{:url("Tablequery/getForm")}',{id:id},function(res){
			main.form = res.data;
			main.form_reset.rptDate = main.form.rptDate;
			main.form_reset.departName = main.form.departName;
			main.form_reset.departId = main.form.departId;
		});
	},
	methods:{
		reset() {
			this.$confirm('确定要重置吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				var tmp = $.extend(true,{},main.form_reset);
				tmp.linkMan = this.form.linkMan;
				tmp.linkType = this.form.linkType;
				this.form = tmp;
			}).catch(() => {});
		},
		delRow1(item) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				var index = this.form.form1.poorVillages.indexOf(item);
				if (index !== 0) {
					this.form.form1.poorVillages.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		delRow2(index) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				if (index !== 0) {
					this.form.form2.servicePlatforms.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		delRow3(index) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				if (index !== 0) {
					this.form.form3.transportSystems.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		delRow4(index) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				if (index !== 0) {
					this.form.form4.projectBuilds.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		delRow5(index) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				if (index !== 0) {
					this.form.form5.trainProjects.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		delRow7(index) {
			this.$confirm('除填写错误外，禁止删除！确定还要删除数据吗？', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(() => {
				if (index !== 0) {
					this.form.form7.govDecisions.splice(index, 1)
				}else{
					this.$alert('第一行不能删除哦', '错误',{
						type:"error",showClose:false
					})
				}
			}).catch(() => {});
		},
		addRow1() {
			this.form.form1.poorVillages.push({name:'',address:'',lonlat:'',poorCount:''});
		},
		addRow2() {
			this.form.form2.servicePlatforms.push({
				buildType:'',name:'',address:'',lonlat:'',mainFunction:'',managePeople:'',
				linkTel:'',userIds:'',code:'',equipment:'',isShare:'false'
			});
		},
		addRow3() {
			this.form.form3.transportSystems.push({
				buildType:"",name:"",address:"",lonlat:"",managePeople:"",linkTel:""
			});
		},
		addRow4() {
			this.form.form4.projectBuilds.push({
				name:"",buildContent:"",projectEnter:"",lonlat:"",
				companyManager:"",manageTel:""
			});
		},
		addRow5() {
			this.form.form5.trainProjects.push({
				name:"",content:"",projectEnter:"",lonlat:"",companyManager:"",
				manageTel:"",signInFile:""
			});
		},
		addRow7() {
			this.form.form7.govDecisions.push({
				name:"",officeHolder:"",determineFile:"",publicUrl:""
			});
		},
		addMapoint1(index) {
			$("#aMap").attr('src',"{:url('Gis/map_addpoint_tool')}?r=Math.random(0,9999)");
			map.showMap = true;
			map.index = index;
		},
		addMapoint2(index) {
			$("#bMap").attr('src',"{:url('Gis/map_addpoint_tool')}?r=Math.random(0,9999)");
			bmap.showMap = true;
			bmap.index = index;
		},
		addMapoint3(index) {
			$("#cMap").attr('src',"{:url('Gis/map_addpoint_tool')}?r=Math.random(0,9999)");
			cmap.showMap = true;
			cmap.index = index;
		},
		addMapoint4(index) {
			$("#dMap").attr('src',"{:url('Gis/map_addpoint_tool')}?r=Math.random(0,9999)");
			dmap.showMap = true;
			dmap.index = index;
		},
		addMapoint5(index) {
			$("#eMap").attr('src',"{:url('Gis/map_addpoint_tool')}?r=Math.random(0,9999)");
			emap.showMap = true;
			emap.index = index;
		},
		autoCompute1() {
			if(this.form.form1.poorPeopleSum !=0){
				this.form.form1.poorAvgProfit
				=(this.form.form1.helpAddProfit/this.form.form1.poorPeopleSum).toFixed(2);
			}else{
				this.form.form1.poorAvgProfit = (0).toFixed(2);
			}
		},
		autoCompute5() {
			this.form.form5.trainSum
				= Number(this.form.form5.govCount) + Number(this.form.form5.farmerCount);
			this.form.form5.netComCount
				= Number(this.form.form5.companyCount) + Number(this.form.form5.peopleCount);
			this.form.form5.netComNewCount
				= Number(this.form.form5.companyNewCount) + Number(this.form.form5.peopleNewCount);
			this.form.form5.poorCount = this.form.form1.jobPeopleCount;
		},
		autoCompute6() {
			for(var i=0;i<this.form.form6.finances.length;i++){
				if(this.form.form6.finances[i].centerMonthPay != ''){
					this.form.form6.finances[i].centerPay = Number(this.form.form6.finances[i].centerMonthPay).toFixed(2);
				}
			}
		},
		checkForm1(){
			var check1 = (Number(this.form.form1.poorPeopleSum) > Number(this.form.form1.poorSum)
				|| Number(this.form.form1.poorSumPeopleSum) > Number(this.form.form1.poorSum)
				|| Number(this.form.form1.jobPeopleCount) > Number(this.form.form1.poorSum)
			)
			var check2 = (Number(this.form.form1.poorVillageFill)>Number(this.form.form1.poorVillageCount))
			if(check1 === true){
				this.$alert('“人数/人次”不应大于“当月服务建档立卡贫困人口”', '错误', {
					type: 'error',
					showClose:false
				}).then(() => {
					this.form.form1.poorPeopleSum = "";
					this.form.form1.poorSumPeopleSum = "";
					this.form.form1.jobPeopleCount = "";
				});
			}
			if(check2 === true){
				this.$alert('“服务站点已覆盖建档立卡贫困村个数”不应大于“建档立卡贫困村个数”', '错误', {
					type: 'error',
					showClose:false
				}).then(() => {
					this.form.form1.poorVillageFill = "";
				});
			}
		},
		checkForm5() {
			// var check1 = (
			// 	(Number(this.form.form5.disableCount) + Number(this.form.form5.poorCount)) > Number(this.form.form5.farmerCount)
			// ),
			var check1 = false,
			check2 = (
				Number(this.form.form5.companyNewCount) > Number(this.form.form5.companyCount)
			),
			check3 = (
				Number(this.form.form5.peopleNewCount) > Number(this.form.form5.peopleCount)
			);
			if(check1 === true){
				this.$alert('“其中：建档立卡贫困人口”、“残疾人”数量之和不应大于“农村青年、返乡农民工等人员”数量', '错误', {
					type: 'error',
					showClose:false
				}).then(() => {
					this.form.form5.disableCount = "";
				});
			}
			if(check2 === true){
				this.$alert('“其中，当月经培训新孵化企业网商数”不应大于“网商中：当月新增企业网商总数”', '错误', {
					type: 'error',
					showClose:false
				}).then(() => {
					this.form.form5.companyNewCount = "";
				});
			}
			if(check3 === true){
				this.$alert('“其中，当月经培训新孵化个人网商数”不应大于“网商中：当月新增个人网商总数”', '错误', {
					type: 'error',
					showClose:false
				}).then(() => {
					this.form.form5.peopleNewCount = "";
				});
			}
		},
		checkForm6() {
			var index = -1;
			for(var i=0;i<this.form.form6.finances.length;i++){
				if(this.form.form6.finances[i].centerMonthPay != '' && this.form.form6.finances[i].centerMonthPay > 2000){
					var index = i;
				}
			}
			if(index != -1){
				this.$alert('中央财政当月拨付资金金额不能超过2000万,请重新输入！', '错误', {
					type: 'error',
					showClose:false
				}).then((res) => {
					this.form.form6.finances[index].centerMonthPay = "";
					this.form.form6.finances[index].centerPay = "";
				});
			}
		},
		autoLink() {
			var arr = [];
			arr = $.extend(true,[],main.form_reset.form6.finances);
			// 农产品上行form4
			for(var i=0;i<this.form.form4.projectBuilds.length;i++){
				var isInsert = false;
				for(item in this.form.form4.projectBuilds[i]){
					if(this.form.form4.projectBuilds[i][item] != ''){
						isInsert = true;
					}
				}
				if(isInsert){
					arr.push({
						td1:"农产品上行",td2:this.form.form4.projectBuilds[i].name,
						centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
						companyPay:"",centerSupport:"",
						projectCompany:this.form.form4.projectBuilds[i].projectEnter
					});
				}
			}
			// 农村电商培训form5
			for(var i=0;i<this.form.form5.trainProjects.length;i++){
				var isInsert = false;
				for(item in this.form.form5.trainProjects[i]){
					if(this.form.form5.trainProjects[i][item] != ''){
						isInsert = true;
					}
				}
				if(isInsert){
					arr.push({
						td1:"农村电商培训",td2:this.form.form5.trainProjects[i].name,
						centerMoney:"",centerMonthPay:"",centerPay:"",localMoney:"",
						companyPay:"",centerSupport:"",
						projectCompany:this.form.form5.trainProjects[i].projectEnter
					});
				}
			}
			this.form.form6.finances = arr;
		},
		uploadAttach(t,index) {
			this.upSuccessT = t;
			this.upSuccessI = index;
			uploadAlert.is_show = true;
			uploadAlert.limit = 1;
			uploadAlert.upData = {
				'targetpath':'attachments/monthFile/'+this.form.departName+'/'+this.form.rptDate + '/' + t + "_" +index
			};
		},
		upSuccess(res,file){
			var t = this.upSuccessT,i = this.upSuccessI;
			if(res.code == 1){
				this.$notify({
					title:"成功",
					type:"success",
					message:res.msg
				});
				uploadAlert.clearFilesList();
				if(t == 5){
					this.form.form5.trainProjects[i].signInFile = res.data.path;
				}
				if(t == 7){
					this.form.form7.govDecisions[i].determineFile = res.data.path;
				}
			}else{
				this.$notify.error({
					title:"错误",
					message:res.msg
				});
			}
		},
		beforeSave() {
			var error = '';
			if(this.form.linkMan == ''){
				error = "填表人不能为空";
			}
			if(this.form.linkType == ''){
				error = "填表人联系方式不能为空";
			}
			if(error != ''){
				this.$notify.error({title:"错误",message:error});
				return false;
			}
		},
		save() {
			if(this.beforeSave() === false){
				return false;
			}else{
				var param = this.form;
				$.post('{:url("Commit/saveMonth")}',param,function(res){
					main.AjaxCallback(res);
				});
			}
		},
		AjaxCallback(res) {
			if(res.code == 1){
				this.$notify({title:"成功",type:"success",message:res.msg});
			}else{
				this.$notify.error({title:"错误",message:res.msg});
			}
		},
		subTable() {
			if(this.beforeSave() === false){
				return false;
			}else{
				var param = {
					rptDate:this.form.rptDate,
					departName:this.form.departName,
					departId:this.form.departId,
				}
				$.post('{:url("Commit/CommitMonth")}',param,function(response){
					main.AjaxCallback(response);
				});
			}
		}
	},
})
</script>
{/block}
